var fs = require('fs');
var {parse} = require("@babel/parser");
var traverse = require("@babel/traverse").default;
var t = require("@babel/types");
var generator = require("@babel/generator").default;
var jscode = fs.readFileSync("code1.js", {
    encoding: "utf-8",

});
var ast = parse(jscode);

traverse(ast,{
    MemberExpression(path){
        console.log(path)
    }
})

var gg = generator(ast)
fs.writeFileSync('ast_code1.js',gg.code,{
    encoding: "utf-8",

})
console.log(gg.code)

